package com.fys.product.client;

import com.fys.product.common.DecreaseStockInput;
import com.fys.product.common.ProductInfoOutput;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author: fys
 * @description:
 * @create: 2020-07-24 18:19
 **/
@FeignClient("product")
@RequestMapping(value = "/productInfo")
public interface ProductClient {

    @PostMapping("/listForOrder")
    List<ProductInfoOutput> listForOrder(List<String> productIdList);

    @PostMapping("/decreaseStock")
    void decreaseStock(@RequestBody List<DecreaseStockInput> decreaseStockInputList);

}
